#include "CThreadManage.h"


CThreadManage::CThreadManage()
{
  m_Pool = new CThreadPool();
}

CThreadManage::CThreadManage(int iMaxNum, int iAvailLow, int iAvailHigh, int iInitNum)
{
  m_Pool = new CThreadPool(iMaxNum, iAvailLow, iAvailHigh, iInitNum);
}

CThreadManage::~CThreadManage()
{
  if(m_Pool != NULL)
  {
    delete m_Pool;
  }
}


int CThreadManage::Run(CJob* job,void* jobdata)
{
	return m_Pool->Run(job, jobdata);
}

void CThreadManage::TerminateAll(void)
{
  m_Pool->TerminateAll();
}